Skip to content

adds object/function filter to local plugin#807

Merged
dahlbyk merged 11 commits into
masterfrom
benoj-filter
Apr 15, 2018
Merged

adds object/function filter to local plugin#807
dahlbyk merged 11 commits into
masterfrom
benoj-filter

Conversation

@dahlbyk

@dahlbyk dahlbyk commented Apr 15, 2018

Copy link
Copy Markdown
Contributor

Git fail. This all belongs to #747 to close #746.

Comment thread stories/index.tsx Outdated
console.log(e.target.value);
const filterAsMap = new Map();
filterAsMap.set('name', e.target.value);
this.props.setFilter(filterAsMap);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arnimhanke @benoj it seems wrong that the internal use of ImmutableJS is leaking out here. Thoughts on adding a toJSON() to the reducer?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. TBH I'm not a huge fan of Immutable.JS so would be good not to have that bleed into outside projects using Griddle

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good not to have that bleed into outside projects using Griddle

Agreed. I'm not thrilled with the places that it does leak, but it seems likely to be a nontrivial performance hit to un-Immutable data before exposing rows to filter functions (for example).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - This is probably the reason I left it there originally (It was a while back I started this...)

Might be safe to leave it as is for now for perf. reasons and look to add a feature where can optionally un-Immutable data before filtering?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. setFilter(filter, { json: true }) where json means dont sent me immutableJs object

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you two!
But I must admit that I don't know exactly which part of the code you want to be changed, so i cant give any input in this discussion :-/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7bacdb4!

Added some TypeScript smarts, too.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as i can see it looks good :)
Is there something I can do for progress?

@dahlbyk dahlbyk merged commit 1fcc9fd into master Apr 15, 2018
@dahlbyk

dahlbyk commented Apr 15, 2018

Copy link
Copy Markdown
Contributor Author

I'll try to ship a point release with this yet today. Thanks @benoj and @arnimhanke!

@dahlbyk dahlbyk deleted the benoj-filter branch April 16, 2018 13:53
@dahlbyk

dahlbyk commented Apr 16, 2018

Copy link
Copy Markdown
Contributor Author

This has been released with griddle-react@1.13.0, though not tagged as latest yet.

cc @waclock

@arnimhanke

Copy link
Copy Markdown

Do you mean 1.13.0 (I cant find the changes in 1.3.0) ? :)

@dahlbyk

dahlbyk commented Apr 16, 2018

Copy link
Copy Markdown
Contributor Author

Do you mean 1.13.0?

That's what I said 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advanced Filtering

4 participants